<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>SVG分组</title>
  <style>
    html,
    body {
      width: 100%;
      height: 100%;
      background-color: #000;
      margin: 0;
    }

    #div1 {
      width: 400px;
      height: 400px;
      background-color: #fff;
      margin: 0 auto;
    }

    #g1{
      animation: shan 2s infinite linear;
    }

    @keyframes shan {
      0%{
        opacity: 1;
      }
      50%{
        opacity: 0.5;
      }
      100%{
        opacity: 1;
      }
    }
  </style>
</head>

<body>
  <div id="div1">
    <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
      <g id="g1" transform="translate(200, 200)" stroke="red" stroke-width="5">
        <circle r="40" fill="transparent"></circle>
        <circle r="30" fill="transparent"></circle>
        <circle r="20" fill="transparent"></circle>
        <circle r="10" fill="transparent"></circle>
      </g>
    </svg>
  </div>
</body>

</html>